package com.ruoyi.common.enums.comlbs;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * pop中定位状态枚举
 */
@NoArgsConstructor
@Getter
public enum LocationStateEnum implements DataEnum {


    NoLocation(0, "未定位"),

    SingleLocation(1, "单点定位"),

    DifferentialLocation(2, "差分定位"),

    FixedSolution(3, "固定解"),

    FloatSolution(4, "浮点解"),
    ;

    private Integer code;

    private String text;

    LocationStateEnum(Integer code) {
        this.code = code;
    }

    LocationStateEnum(Integer code, String text) {
        this.code = code;
        this.text = text;
    }

    @JsonCreator
    public static LocationStateEnum fromInt(Integer getCode) {
        return DataEnum.getEnum(LocationStateEnum.class, getCode);
    }

    @JsonCreator
    public static LocationStateEnum fromString(String getCode) {
        return DataEnum.getEnum(LocationStateEnum.class, getCode);
    }


    @Override
    @JsonValue
    public Integer getCode() {
        return code;
    }

    public String getText() {
        return text;
    }

}
